-
Couldn't load subscription status.
- Fork 0
obs: improve spans use in flashbots submit #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
src/tasks/submit/flashbots.rs
Outdated
| // Prepare a MEV bundle with the configured call type from the sim result | ||
| let Ok(bundle) = | ||
| self.prepare(&sim_result).instrument(span.clone()).await.inspect_err(|error| { | ||
| let bundle = match self.prepare(&sim_result).instrument(span.clone()).await { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i somewhat prefer the let Ok(_) else
45f8e09 to
8951b43
Compare
|
|
||
| // Send the bundle to Flashbots, instrumenting the send future so all | ||
| // events inside the async send are attributed to the submit span. | ||
| let response = async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the future is instumented directly. no need to use the async block

This PR improves span usage in the Flashbots submit task for better tracking in groundcover and analytics.